//
//  RankModel.m
//  CoolRollerSkating
//
//  Created by WSL on 15/11/23.
//  Copyright © 2015年 Coollang. All rights reserved.
//

#import "RankModel.h"

@implementation RankModel

-(instancetype)initWithDictionary:(NSDictionary *)dic{
    
    if ([super init]) {
        _userID   = dic[@"UserID"];
        _userName = dic[@"UserName"];
        _totalCount = dic[@"TotalCount"];
        _signature = dic[@"Signature"];
        _maxspeed = dic[@"MaxSpeed"];
        _headIcon = dic[@"Icon"];
        _duration = dic[@"Duration"];
        _maxScore = dic[@"Score"];
    }
    
    return self;
}

- (NSString *)valueWithRankModeType:(RankModeType)type
{
    switch (type) {
        case RankModeTypeMaxSpeed:
            return self.maxspeed;
            break;
        case RankModeTypeAvgScore:
            return self.maxScore;
            break;
        case RankModeTypeSwings:
            return self.totalCount;
            break;
    }
}

@end
